import { ListPage } from "custom/index";
import { personalCommissionCheckPage } from '../api'
import dayjs from 'dayjs'
import CommissionSearch from './CommissionSearch.vue'

const page = new ListPage('DayPage');

page
  .api(personalCommissionCheckPage)
  .useSearch()
    .addInputItem('month', '', dayjs().format('YYYY-MM'))
    .setComponent(CommissionSearch)
    .end()
  .useTable()
    .useIndexColumn().end()
    .useColumn('exNameLabel').label('分部客服').minWidth(140).end()
    .useColumn('shopName').label('店铺名称').minWidth(140).end()
    .useColumn('accountName').label('子账号名称').minWidth(200).end()
    .useColumn('baseSalary').label('分摊底薪').minWidth(160).end()
    .useColumn('startDate').label('开始日期').minWidth(200).end()
    .useColumn('endDate').label('结束日期').minWidth(200).end()
    .useColumn('workDays').label('工作天数').minWidth(140).end()
    .useColumn('baseProfit').label('底薪效益').minWidth(140).end()
    .useColumn('monthSalary').label('月销售额').minWidth(140).end()
    .useColumn('commissionRatio').label('提成比例').minWidth(140).end()
    .useColumn('commissionProfit').label('提成效益').minWidth(140).end()
    .useColumn('sumProfit').label('效益合计').minWidth(140).end() 
    .end()
  .usePagination()
    .end()

export default page
